/**
 * File Name	: IUserService.java
 * Author		: adelwin
 * Create Date	: May 9, 2010 10:00:23 AM
 *
 */
package org.jampang.base.service;

import org.jampang.base.context.LoginContext;
import org.jampang.base.exception.AuthenticationException;
import org.jampang.base.model.UserModel;
import org.jampang.core.exception.GenericServiceException;
import org.jampang.core.service.IBaseService;

public interface IUserService extends IBaseService {
	
	/**
	 * Method Signature : registerUser(UserModel) <br />
	 * Method Return    : LoginContext <br />
	 * Method Param     : UserModel, LoginContext <br />
	 * Method Behavior  : will register a user given in input parameter, 
	 *                    and return the login context of the registered user when successful 
	 *                    or throws a GenericServiceException when an exception occurred. 
	 */
	public LoginContext registerUser(UserModel inputModel, LoginContext loginContext) throws GenericServiceException;

	/**
	 * Method Signature : authenticateUser(UserModel) <br />
	 * Method Return    : LoginContext <br />
	 * Method Param     : UserModel <br />
	 * Method Behavior  : will authenticate the login credentials given in input parameter, 
	 *                    and return the login context of the user when successful
	 *                    or throws an AuthenticationException when an exception occurred.
	 */
	public LoginContext authenticateUser(UserModel inputModel) throws AuthenticationException;

	/**
	 * Method Signature : lockUser(UserModel) <br />
	 * Method Return    : void <br />
	 * Method Param     : UserModel <br />
	 * Method Behavior  : will lock the user given in input parameter,
	 *                    will not return anything when successful
	 *                    throws an AuthenticationException when an exception occurred.
	 */
	public void lockUser(UserModel inputModel) throws GenericServiceException;
}
